#ifndef Timer_h
#define Timer_h

#include <iostream>
#include <osg/Timer>

#include "Hud.h"
#include "StageManager.h"
#include "AbstractStage.h"

class Engine;

class Timer {

public:
	Timer();

	void start();
	void update();
	void pause();
	void stop();
	bool isPause();
	bool isRunning();
	double getTimeLeft();

	inline osg::Timer* getTimer() {return m_ptimer;}

private:
	osg::Timer * m_ptimer;
	bool m_bpause;
	bool m_bstart;
	osg::Timer_t m_tstartPause;
	osg::ref_ptr<osgText::Text> timeLeftTxt;
	Hud* hud;
	char timeDisplayed[6];
};

#endif // Timer_h
